package blackstar.agent.schedule;

import blackstar.agent.event.Event;

/**
 * @author RayWoo (ayufox@gmail.com)
 * 
 */
public class ScheduleEvent extends Event
{
	private ScheduleTask task;
	private String cronExpression;

	public ScheduleEvent(String name, String cronExpression, ScheduleTask task)
	{
		super(name);
		this.cronExpression = cronExpression;
		this.task = task;
	}

	public ScheduleEvent(String cronExpression, ScheduleTask task)
	{
		this(null, cronExpression, task);
	}

	public String getCronExpression()
	{
		return cronExpression;
	}

	public ScheduleTask getTask()
	{
		return task;
	}
}
